package cn.edu.cqut.ex2.test2;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

public class TV {
    int channel;
    void setChannel(int m)
    {
        if(m>=1){
            channel=m;
        }
    }
    int getChannel()
    {
        return channel;
    }
    void showProgram()
    {
        switch (channel)
        {
            case 1:
                System.out.println("综合频道");
                break;
            case 2:System.out.println("经济频道");
                break;
            case 3:
                System.out.println("文艺频道");
            case 4:
                System.out.println("国际频道");
            case 5:
                System.out.println("体育频道");
            default:System.out.println("不能收看"+channel+"频道");

        }
    }
}
